{include file="header.html"}

<div class="page-header">
	<h6>
		优惠劵管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			手动为会员发放优惠劵
		</small>
	</h6>
</div><!-- /.page-header -->
<div class="row">
<div class="col-xs-12">
	<form class="form-horizontal" role="form" method="post" action="?app=coupon&act=grant" enctype="multipart/form-data">
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="in_shop"> 是否发放给所有会员： </label>
			<div class="col-sm-10">
				<div class="radio">
					<label>
						<input type="radio" name="all" value="2" class="ace yes" />
						<span class="lbl"> 是</span>
					</label>
				</div>
				<div class="radio">
					<label>
						<input type="radio" name="all" value="1" checked class="ace no" />
						<span class="lbl"> 否</span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group member_id">
			<label class="col-sm-2 control-label no-padding-right" for="member_id"><a href="?app=member&act=index"> 会员名称：</a></label>
			<div class="col-sm-10">
				<select id="first-disabled" class="selectpicker" id="member_id" name="member_id" data-hide-disabled="true" data-live-search="true" style="width:220px;">
					<option value="">请选择</option>
					{foreach from = $member item =r}
						<option value="{$r->id}">{$r->name}</option>
					{/foreach}
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="coupon_id"> 请选择优惠劵 </label>
			<div class="col-sm-2">
				<select name="coupon_id" id="coupon_id" class="form-control" style="width:220px;">
					<option value="">请选择优惠劵</option>
						{foreach from = $coupon item =row}
						<option value="{$row->id}">名称：{$row->name} 面值：{$row->coupon_money}</option>
						{/foreach}
				</select> 		
			</div>
		</div>

		<div class="clearfix form-actions">
			<div class="col-md-offset-3 col-md-9">
				<button class="btn btn-info" type="submit">
					<i class="ace-icon fa fa-check bigger-110"></i>
					提交
				</button>

				&nbsp; &nbsp; &nbsp;
				<button class="btn" type="reset">
					<i class="ace-icon fa fa-undo bigger-110"></i>
					重置
				</button>
			</div>
		</div>
	</form>
</div>
</div>

{include file="footer.html"}
<script>

	$(window).on('load', function () {
            $('.selectpicker').selectpicker({
                'selectedTexselectpickert': 'cat'
            });
        });
	$(function(){
	$('.yes').click(function(){
		$('.member_id').hide();
	})
	$('.no').click(function(){
		$('.member_id').show();
	})
})

</script>